package com.example.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.entity.TreeMenu;
import com.example.service.TreeMenuService;

@RestController
public class TreeMenuController {
	@Autowired
	private TreeMenuService treeMenuService;
	
	@PostMapping("/getMenu")
	public List<TreeMenu> getTreeMenu(String roleIds){
//		List<Integer> roleIds = new ArrayList<>();
//		for (Roles r : roleList) {
//			roleIds.add(r.getId());
//		}
		return treeMenuService.getTreeMenu(roleIds);
	}

}
